package com.zzl.bonds.ticket.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 分公司集团授信额度管理
 *
 * @author gull
 * @date 2022-07-06 13:43:52
 */
@Data
@TableName("t_subsidiary_quota")
@ApidocModel
@SuppressWarnings("javadoc")
public class SubsidiaryQuotaEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    @ApidocModelProperty(description = "主键 uuid")
    private String id;
    @ApidocModelProperty(description = "核心企业授信id")
    private String coreEnterpriseCreditId;
    @ApidocModelProperty(description = "额度编号")
    private String creditNo;
    @ApidocModelProperty(description = "子公司id")
    private String enterpriseId;
    @ApidocModelProperty(description = "子公司名称")
    private String enterpriseName;
    @ApidocModelProperty(description = "额度上限")
    private Double quotaMaxLimit;
    @ApidocModelProperty(description = "已用额度")
    private Double usedAmount;
    @ApidocModelProperty(description = "剩余额度")
    private Double surplusAmount;
    @ApidocModelProperty(description = "冻结额度 ")
    private Double frozenAmount;
    @ApidocModelProperty(description = "可用额度")
    private Double availableAmount;
    @ApidocModelProperty(description = "平台冻结额度")
    private Double platFrozenAmount;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "创建时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "修改时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @ApidocModelProperty(description = "创建人")
    private Integer creatorId;
    @ApidocModelProperty(description = "修改人")
    private Integer updaterId;
    @ApidocModelProperty(description = "备注")
    private String remark;
    @ApidocModelProperty(description = "1 表示删除，0 表示未删除")
    @TableField(value = "is_deleted")
    @TableLogic(value = "0", delval = "1")
    private Integer deletedStatus;
    @ApidocModelProperty(description = "金融机构id")
    private String institutyId;
    @ApidocModelProperty(description = "金融机构名称")
    private String institutyName;
    @ApidocModelProperty(description = "是否最新数据：1 最新数据，0 历史数据")
    private Integer latestStatus;
    @ApidocModelProperty(description = "1 集团授信 2 独立授信")
    private Integer creditType;

}
